package com.haiyou.data.common.accessor.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 如果使用redisson映射缓存，使用它来指定Map类型
 * 
 * RMap RMapCache RLocalCachedMap
 * 
 * @author xingyuan
 *
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Inherited
@Documented
public @interface MappingType {

	String MAPPING = "org.redisson.api.RMap";
	String MAPPING_CACHE = "org.redisson.api.RMapCache";
	String LOCAL_CACHED_MAPPING = "org.redisson.api.RLocalCachedMap";

	/**
	 * org.redisson.api.RMap</br>
	 * org.redisson.api.RMapCache</br>
	 * org.redisson.api.RLocalCachedMap</br>
	 * 
	 * @return
	 */
	String value() default MAPPING_CACHE;
}
